package com.heima.apis.wemedia;

import com.heima.model.admin.dtos.*;
import com.heima.model.article.dtos.UpOrDownDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewsDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {

    @GetMapping("/api/v1/channel/list")
    ResponseResult getChannels();

    @PostMapping("/api/v1/channel/list")
    ResponseResult getChannelList(@RequestBody ChannelDto dto);

    @PostMapping("/api/v1/channel/save")
    ResponseResult saveChannel(@RequestBody WmChannel channel);

    @PostMapping("/api/v1/channel/update")
    ResponseResult UpdateChannel(@RequestBody WmChannel channel);

    @GetMapping("/api/v1/channel/del/{id}")
    ResponseResult deleteChannel(@PathVariable Integer id);

    @PostMapping("/api/v1/sensitive/list")
    ResponseResult getSensitives(@RequestBody SensitiveDto dto);

    @PostMapping("/api/v1/sensitive/save")
    ResponseResult saveSensitive(@RequestBody WmSensitive sensitive);

    @PostMapping("/api/v1/sensitive/update")
    ResponseResult updateSensitive(@RequestBody WmSensitive sensitive);

    @DeleteMapping("/api/v1/sensitive/del/{id}")
    ResponseResult deleteSensitive(@PathVariable Integer id);

    @PostMapping("/api/v1/news/list_vo")
    ResponseResult getNewsList(@RequestBody NewsDto dto);

    @GetMapping("/api/v1/news/one_vo/{id}")
    ResponseResult getNewsContent(@PathVariable Integer id);

    @PostMapping("/api/v1/news/auth_fail")
    ResponseResult boHui(@RequestBody BhDto dto);

    @PostMapping("/api/v1/news/auth_pass")
    ResponseResult newsTg(@RequestBody NewsTgDto dto);

    @PostMapping("/api/v1/admin/constant/list")
    ResponseResult getConnentList(@RequestBody ConnentDto dto);

    @PostMapping("/api/v1/article/up")
    ResponseResult up(@RequestBody UpOrDownDto dto);

    @PostMapping("/api/v1/article/down")
    ResponseResult down(@RequestBody UpOrDownDto dto);
}
